<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport"
          content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover"/>
    <style>
        /* 底部导航栏样式 */
        .bottom-bar {
          position: relative;
          left: 0;
          bottom: 0;
          width: 100%;
          height: 40px;
          line-height: 40px;
          background-color: #333;
          color: white;
          text-align: center;
          padding-bottom: calc( env(safe-area-inset-bottom));
        }

        /* 底部导航按钮样式 */
        .bottom-bar button {
          width: 20vw;
          color: white;
          background-color: transparent;
          border: none;
          outline: none;
          cursor: pointer;
        }

        /* 按钮hover效果 */
        .bottom-bar button:hover {
          background-color: #555;
        }

        .bottom-div {
            padding-bottom: calc( env(safe-area-inset-bottom));
        }
    </style>
</head>

<body>
<p id="myId">webview</p>
<div>
    <label for="name">姓名：</label><input type="text" id="name" name="name" autocomplete="name">
</div>
<div>
    <label for="tel-national">手机：</label><input type="text" id="tel-national"
                                                  name="tel-national"
                                                  autocomplete="tel-national">
</div>
<div>
    <label for="street-address">地址：</label><input type="text" id="street-address"
                                                    name="street-address"
                                                    autocomplete="street-address">
</div>
<div>
    <label for="email">邮件：</label><input type="text" id="email" name="email" autocomplete="email">
</div>
<div>
    <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"
         width="100" height="100">
</div>
<button type="button" style="width:100px;height:50px" onclick="callFlutterFunction()">跳转子页面
</button>
<button type="button" style="width:100px;height:50px" onclick="callFlutterFunction2()">跳转子页面
</button>
<p id="demo"></p>
<div class="bottom-div">活动回顾开始了活动回顾开始了活动回顾开始</div>
<!--<footer class="bottom-bar">
    <button onclick="homeFunction()">Home</button>
    <button onclick="favoritesFunction()">Favorites</button>
    <button onclick="settingsFunction()">Settings</button>
</footer>-->
</body>

<script>
    var count = 0;
    for(var i = 0; i < 100; i++) {
        callPrompt();
    }

    function callPrompt() {
        let jsonComplexObject = {
          "name": "李四",
          "age": 25,
          "isStudent": true,
          "hobbies": ["编程", "旅游", "电影", "编程", "旅游", "电影", "编程", "旅游", "电影", "编程", "旅游", "电影", "编程", "旅游", "电影", "编程", "旅游", "电影"],
          "address": {
            "street": "中山路",
            "city": "北京",
            "country": "中国"
          }
        };
        let jsonArray = [
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject },
          { "id": 1, "name": "项目1", info: jsonComplexObject },
          { "id": 2, "name": "项目2", info: jsonComplexObject },
          { "id": 3, "name": "项目3", info: jsonComplexObject },
          { "id": 4, "name": "项目3", info: jsonComplexObject },
          { "id": 5, "name": "项目3", info: jsonComplexObject },
          { "id": 6, "name": "项目3", info: jsonComplexObject },
          { "id": 7, "name": "项目3", info: jsonComplexObject },
          { "id": 8, "name": "项目3", info: jsonComplexObject },
          { "id": 9, "name": "项目3", info: jsonComplexObject },
          { "id": 10, "name": "项目3", info: jsonComplexObject }
        ];
        let jsonString = JSON.stringify(jsonArray);
        let message = prompt(jsonString);
        myLog("callPrompt, message=" + message);
        //console.log("xxxJsObj:", message);
    }

     function myLog(msg) {
      document.getElementById("demo").innerHTML = msg;
    }

    async function callFlutterFunction(){
      console.log("xxxJsObj:", typeof window.FlutterClient);
      JsObj.postMessage('callFlutterFunctionBack');
      console.log("xxxJsObj:", window.FlutterClient);
    }

    async function callFlutterFunction2(){
      JsObj2.postMessage('callFlutterFunction2Back');
    }

    function callFlutterFunctionBack(result){
      console.log("xxxFlutterBack:", result);
    }

    function runJsOnly() {
      count--;
      document.getElementById("demo").innerHTML = "runJsOnly" + count;
    }

    function runJsWithResult() {
      count++;
      document.getElementById("demo").innerHTML = "runJsWithResult" + count;
      return "result from js" + count;
    }

    function loadPage() {
        window.location.href = "https://m.hnair.com";
    }

    // 按钮点击事件的处理函数
    function homeFunction() {
        console.log('Home button clicked');
        // 在这里添加导航到主页的逻辑
    }

    function favoritesFunction() {
        console.log('Favorites button clicked');
        // 在这里添加显示收藏的逻辑
    }

    function settingsFunction() {
        console.log('Settings button clicked');
        // 在这里添加显示设置页面的逻辑
    }
</script>
</html>